from sqlalchemy import Column, Integer, String, DateTime
from datetime import datetime
from ..database import Base

class Video(Base):
    __tablename__ = "videos"

    id = Column(Integer, primary_key=True, index=True)
    title = Column(String, index=True)
    filename = Column(String)
    file_path = Column(String)
    file_size = Column(Integer)
    upload_time = Column(DateTime, default=datetime.utcnow)
    duration = Column(Integer)  # 视频时长（秒） 